package com.yihuan.service;

import com.yihuan.entity.CodeEntity;
import com.yihuan.mapper.CodeMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Author:梦醒
 * Date: 2022/4/20 15:03
 * Dream:
 * 信言不美，美言不信。
 * 善者不辩，辩者不善。
 * 知者不博，博者不知。
 * Function:
 */
@Service
public class CodeService {
    @Resource
    CodeMapper codeMapper;
    
    /**
     * 注册商铺密钥信息
     *
     * @param codeEntity
     * @return
     */
    public int insertCodeByCodeData(CodeEntity codeEntity) {
        return codeMapper.insertCodeByCodeData(codeEntity);
    }
    
    /**
     * 查询数据
     *
     * @param codeEntity
     * @return
     */
    public List<CodeEntity> findCodeByCodeID(CodeEntity codeEntity) {
        return codeMapper.findCodeByCodeID(codeEntity);
    }
}
